package com.xinchao.service;

import com.xinchao.model.BreakdownImg;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 终端故障类型
 *
 * @author linqiang
 * @date 2018-08-08 14:47
 */
public interface BreakdownImgService {
    /**
     * 终端故障图片集合
     *
     * @param deviceCode 终端唯一设备编码
     * @return List<BreakdownType>
     */
    List<BreakdownImg> list(String deviceCode);

    /**
     * 新增终端故障图片
     *
     * @param deviceId 终端ID
     * @param files    故障图片文件
     * @param request  请求
     * @return Map
     * @throws IOException
     */
    Map<String, Object> save(Long deviceId, MultipartFile files, HttpServletRequest request) throws IOException;

    /**
     * 根据主键删除故障图片
     *
     * @param breakdownImgId 故障图片ID
     * @param request        请求
     * @return 影响行数
     */
    int deleteByPrimaryKey(Long breakdownImgId, HttpServletRequest request);
}
